#ifndef _CMD_H_
#define _CMD_H_

#include <iostream>
#include <string>
#include <unistd.h>

class Cmd
{
 public:
  Cmd(std::string command)
    : cmd_str(command)
    { 
    }
  Cmd(std::string command, std::string arg1)
    : cmd_str(command)
    { 
      cmd_str+=" ";
      cmd_str+=arg1;
    }
  Cmd(std::string command, std::string arg1, std::string arg2)
    : cmd_str(command)
    { 
       cmd_str+=" ";
     cmd_str+=arg1;
      cmd_str+= " ";
      cmd_str+=arg2;
    }
  Cmd(std::string command, std::string arg1, std::string arg2, 
      std::string arg3)
    : cmd_str(command)
    { 
      cmd_str+=" ";
      cmd_str+=arg1;
      cmd_str+= " ";
      cmd_str+=arg2;
      cmd_str+= " ";
      cmd_str+=arg3;
    }
  Cmd(std::string command, std::string arg1, std::string arg2, 
      std::string arg3, std::string arg4)
    : cmd_str(command)
    { 
      cmd_str+=" ";
      cmd_str+=arg1;
      cmd_str+= " ";
      cmd_str+=arg2;
      cmd_str+= " ";
      cmd_str+=arg3;
      cmd_str+= " ";
      cmd_str+=arg4;
    }
  Cmd(std::string command, std::string arg1, std::string arg2, 
      std::string arg3, std::string arg4, std::string arg5)
    : cmd_str(command)
    { 
      cmd_str+=" ";
      cmd_str+=arg1;
      cmd_str+= " ";
      cmd_str+=arg2;
      cmd_str+= " ";
      cmd_str+=arg3;
      cmd_str+= " ";
      cmd_str+=arg4;
      cmd_str+= " ";
      cmd_str+=arg5;
    }
  Cmd(std::string command, std::string arg1, std::string arg2, 
      std::string arg3, std::string arg4, std::string arg5,
      std::string arg6)
    : cmd_str(command)
    { 
      cmd_str+=" ";
      cmd_str+=arg1;
      cmd_str+= " ";
      cmd_str+=arg2;
      cmd_str+= " ";
      cmd_str+=arg3;
      cmd_str+= " ";
      cmd_str+=arg4;
      cmd_str+= " ";
      cmd_str+=arg5;
      cmd_str+= " ";
      cmd_str+=arg6;
    }
  Cmd(std::string command, std::string arg1, std::string arg2, 
      std::string arg3, std::string arg4, std::string arg5,
      std::string arg6, std::string arg7)
    : cmd_str(command)
    { 
      cmd_str+=" ";
      cmd_str+=arg1;
      cmd_str+= " ";
      cmd_str+=arg2;
      cmd_str+= " ";
      cmd_str+=arg3;
      cmd_str+= " ";
      cmd_str+=arg4;
      cmd_str+= " ";
      cmd_str+=arg5;
      cmd_str+= " ";
      cmd_str+=arg6;
      cmd_str+= " ";
      cmd_str+=arg7;
    }
  virtual void exec()
    {
      system(cmd_str.c_str());
    }
  virtual void echo()
    {
      std::cout << "processing cmd: " << cmd_str <<  std::endl;
    }
  virtual ~Cmd()
    {}
    
 private:
  std::string cmd_str;
};


#endif

